
#include "hpscserver.h"
#include "hpscclient.h"
#include <QDataStream>
#include <QtDebug>



HPSCServer::HPSCServer(quint16 port,QObject *parent)
	: QTcpServer(parent)
{
	this->listen(QHostAddress("127.0.0.1"),port);
}

HPSCServer::~HPSCServer()
{
}


/*!
    \fn HPSCServer::incomingConnection(int socketId)
 */
void HPSCServer::incomingConnection(int socketId)
{
    qDebug()<<"HPSCServer::connection established";
	HPSCClient *hpscClient = new HPSCClient(this);
    hpscClient->setSocketDescriptor(socketId);
}


/*!
    \fn HPSCServer::debug()
 */
void HPSCServer::debug()
{
    qDebug()<<"debug";
}
